﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="DonHangHistory.aspx.cs" Inherits="Transport.DonHangHistory" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <form id="form1" runat="server">
        <% 
            if (Session["user_name"] == null)
            {
                Response.Redirect("Login.aspx");
            }
        %>
        <div class="wrapper order">
        <div class="ordtr">
			 Lịch sử đơn hàng
        </div>
        <div class="main_category_wrapper min">
            <a href="Hirecars.aspx">&lt; Trở về thuê xe</a>
            <asp:GridView runat="server" ID="GridView_CTDX" AutoGenerateColumns="false" EmptyDataText="Không có đơn hàng."
                GridLines="None" Width="100%" CellPadding="5" ShowFooter="true">
                <HeaderStyle HorizontalAlign="Left" BackColor="#585858" ForeColor="#FFFFFF" />
                <FooterStyle HorizontalAlign="Right" BackColor="#585858" ForeColor="#FFFFFF" />
                <AlternatingRowStyle BackColor="#F8F8F8" />
                <Columns>
                    <asp:BoundField DataField="id" HeaderText="ID" ReadOnly="True" SortExpression="id" />
                    <asp:BoundField DataField="ngay_dat" HeaderText="Ngày đặt" ReadOnly="True" DataFormatString="{0:d}"
                        ApplyFormatInEditMode="true" SortExpression="ngay_dat" />
                    <asp:BoundField DataField="ten_dang_nhap" HeaderText="Tên ĐN" SortExpression="ten_dang_nhap" />
                    <asp:TemplateField HeaderText="Dịch vụ">
                        <ItemTemplate>
                            <asp:EntityDataSource ID="EntityDataSource_DV" runat="server" ConnectionString="name=transportEntities"
                                DefaultContainerName="transportEntities" EnableFlattening="False" EntitySetName="dich_vu"
                                EntityTypeFilter="dich_vu">
                            </asp:EntityDataSource>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Tình trạng">
                        <ItemTemplate>
                            <asp:DropDownList ID="ddl_uStatus" runat="server" DataSourceID="EntityDataSource_Status"
                                DataTextField="ten_tinh_trang" DataValueField="ma_tinh_trang_dat_xe" SelectedValue='<%# Bind("ma_tinh_trang_dat_xe") %>'>
                            </asp:DropDownList>
                            <asp:EntityDataSource ID="EntityDataSource_Status" runat="server" ConnectionString="name=transportEntities"
                                DefaultContainerName="transportEntities" EnableFlattening="False" EntitySetName="tinh_trang_dat_xe"
                                EntityTypeFilter="tinh_trang_dat_xe">
                            </asp:EntityDataSource>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="PT lái">
                        <ItemTemplate>
                            <asp:DropDownList ID="ddl_uPTL" runat="server" DataSourceID="EntityDataSource_PTL"
                                DataTextField="ten_phuong_thuc" DataValueField="ma_phuong_thuc" SelectedValue='<%# Bind("phuong_thuc_lai") %>'>
                            </asp:DropDownList>
                            <asp:EntityDataSource ID="EntityDataSource_PTL" runat="server" ConnectionString="name=transportEntities"
                                DefaultContainerName="transportEntities" EnableFlattening="False" EntitySetName="phuong_thuc_lai"
                                EntityTypeFilter="phuong_thuc_lai">
                            </asp:EntityDataSource>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="so_cho" HeaderText="Số chỗ" SortExpression="so_cho" />
                    <asp:BoundField DataField="so_luong_xe" HeaderText="SL xe" SortExpression="so_luong_xe" />
                    <asp:BoundField DataField="tu_ngay" HeaderText="Từ ngày" DataFormatString="{0:d}"
                        ApplyFormatInEditMode="true" SortExpression="tu_ngay" />
                    <asp:BoundField DataField="den_ngay" HeaderText="Đến ngày" DataFormatString="{0:d}"
                        ApplyFormatInEditMode="true" SortExpression="den_ngay" />
                    <asp:BoundField DataField="gio_don" HeaderText="Giờ đón" SortExpression="gio_don" />
                    <asp:BoundField DataField="dia_diem_don" HeaderText="Địa điểm đón" SortExpression="dia_diem_don" />
                    <asp:BoundField DataField="ghi_chu" HeaderText="Ghi chú" SortExpression="ghi_chu" />
                    <asp:TemplateField HeaderText="Miền">
                        <ItemTemplate>
                            <asp:DropDownList ID="ddl_uMien" runat="server" DataSourceID="EntityDataSource_Mien"
                                DataTextField="ten_mien" DataValueField="ma_mien" SelectedValue='<%# Bind("ma_mien") %>'>
                            </asp:DropDownList>
                            <asp:EntityDataSource ID="EntityDataSource_Mien" runat="server" ConnectionString="name=transportEntities"
                                DefaultContainerName="transportEntities" EnableFlattening="False" EntitySetName="miens">
                            </asp:EntityDataSource>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="ti_le_giam_gia" HeaderText="TL giảm giá" SortExpression="ti_le_giam_gia" />
                    <asp:BoundField DataField="chi_phi_du_kien" HeaderText="CP dự kiến" SortExpression="chi_phi_du_kien" />
                    <asp:BoundField DataField="tien_da_thanh_toan" HeaderText="Tiền đã TT" SortExpression="tien_da_thanh_toan" />
                </Columns>
            </asp:GridView>
            <div id="vat">
                <h5>
                    <i>Lưu ý: Đơn vị tính USD ( đã bao gồm VAT) </i>
                </h5>
            </div>
        </div>
        </div>
    </form>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentFooter" runat="server">
</asp:Content>
